﻿using System;
using System.ServiceModel;
using System.ServiceModel.Activation;
using System.ServiceModel.Web;

namespace WcfRestService1
{
    [ServiceContract]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Allowed)]
    [ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall)]
    public class Service2 : SvcBase
    {
        [WebGet(UriTemplate = "")]
        public SampleItem GetCollection()
        {
            throw new Exception("第二个例子");
        }
    }
}
